/*
 * @Author: liyongxuan
 * @Date: 2018-04-26 14:36:37
 * @description: 事件-->IPO资金监管
*/

import Api from '../../../api/event/eventIpoController.api';
import { JsonResult, EventIpoDto } from '../../../api/Interface';
import { apiHttp } from '../../apiHttp';
import { EventPublicSearchDto } from '../Interface';

export default {
  // 删除IPO资金监管
  delEventIpo: async (id: string): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.deleteEventIpo, {id});
    return res;
  },
  // 获取IPO资金监管列表
  getEventIpoPage: async (eventIpoSearchDto: EventPublicSearchDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.eventIpoPage, eventIpoSearchDto);
    return res;
  },
  // 添加IPO资金监管
  addSaveEventIpo: async (eventIpoDto: EventIpoDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.saveEventIpo, eventIpoDto);
    return res;
  },
  // 编辑IPO资金监管
  updateEventIpo: async (eventIpoDto: EventIpoDto): Promise<JsonResult> => {
    const res: JsonResult = await apiHttp(Api.updateEventIpo, eventIpoDto);
    return res;
  }
};